Remove workaround for non-recursive mutexes.
authorNils Philippsen <nils@redhat.com>
Fri, 13 Feb 2015 12:29:13 +0000 (13:29 +0100)
committerNils Philippsen <nils@redhat.com>
Fri, 13 Feb 2015 12:55:24 +0000 (13:55 +0100)
This workaround caused concurrency-stress-test to fail occasionally.
Meanwhile BablMutex wraps pthread mutexes in a way that they are
initialized as recursive.

This partially reverts commit 9d2aa7d13ac421935de1e87301c48af50b0ceb59.

babl/babl-fish-path.c

index 5dc06017f5b4b95ab4b0d0dfe3ac39bb9a9c6aeb..bf9c520bda4d77d1af792232b6d16986e9ab1ed3 100644 (file)
@@ -300,8 +300,7 @@ babl_fish_path (const Babl *source,
     pc.fish_path = babl;
     pc.to_format = (Babl *) destination;
 
-    if (babl_in_fish_path <= 0)
-      babl_mutex_lock (babl_format_mutex);
+    babl_mutex_lock (babl_format_mutex);
     /* we hold a global lock whilerunning get_conversion_path since
      * it depends on keeping the various format.visited members in
      * a consistent state, this code path is not performance critical
@@ -312,8 +311,7 @@ babl_fish_path (const Babl *source,
     get_conversion_path (&pc, (Babl *) source, 0, max_path_length ());
 
     babl_in_fish_path--;
-    if (babl_in_fish_path <= 0)
-      babl_mutex_unlock (babl_format_mutex);
+    babl_mutex_unlock (babl_format_mutex);
     babl_free (pc.current_path);
   }